﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SmartMathLibrary.Management
{
    /// <summary>
    /// This class provides methods to find out the interfaces of a class instance.
    /// </summary>
    [Serializable]
    public class InterfaceAnalyzer : AbstractAnalyzer
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="InterfaceAnalyzer"/> class.
        /// </summary>
        /// <param name="analyzerObject">The object to analyze.</param>
        public InterfaceAnalyzer(Object analyzerObject)
            : base(analyzerObject)
        {
        }

        /// <summary>
        /// Analyzes the interfaces of the specified class instance.
        /// </summary>
        /// <returns>The interfaces of the specified class instance.</returns>
        public Type[] AnalyzeInterfaces()
        {
            Type analyzerType = this.AnalyzerObject.GetType();

            return analyzerType.GetInterfaces();
        }
    }
}